<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>智能训练</title>
		<link rel="stylesheet" type="text/css" href="css/learn-IntelligentTraining.css"/>
		<link rel="stylesheet" type="text/css" href="css/layui.css" />
		<link rel="stylesheet" type="text/css" href="css/learn-HomePage/layui-v2.6.7/layui/css/layui.css"/>
		<link rel="shortcut icon" href="img/logo.png" />
		<link rel="stylesheet" type="text/css" href="./css/learn-HomePage/learn-homePage.css"/>
		<script src="js/layui.js" charset="utf-8"></script>
		<script src="jquery/jquery-1.11.3.min.js"></script>
		<script src="js/gtl/select.js"></script>
	</head>
	<body>
		<!--导航栏-->
		<header>
			<a name="dbl"></a>
			<div class="dbl">
				<div>
					<img src="img/learn-HomePage-img/farbnf.png" class="logo"/>
				</div>
					<div>
						<ul>
							<li id="a" id="HeadPortrait">
								<div class="one"  style="height: 50px; width: 50px;" >
									<img src="img/learn-HomePage-img/2.png" class="tx" id="show"/>
								</div>
								<ul id="erji" class="erji">
									<li><a href="learn_Personal.html">个人中心</a></li>
									<li><a href="javascript:;"><span onclick="clos();">退出</span></a></li>
								</ul>
							</li>
							<li id="a"><a href="learn_WrongBook.html">错题本</a></li>
							<li id="a"><a href="learn-Testrecords.html">考试记录</a></li>
							<li id="a"><a href="learn-Testcenter.html">试卷中心</a></li>
							<li id="a"><a href="learn_IntelligentTraining.html">智能训练</a></li>
							<li id="a"><a href="learn-VideoClass.html">视频课堂</a></li>
							<li id="a"><a href="learn-Homepage.html">首页</a></li>
						</ul>
					</div>
			</div>		
		</header>
				
		
		<div id="div1">
			<ul>
				<li>
					<div id="div1-div">
						<span class="span5">学科：</span>
						<div id="div-select">
							<select id="dropdown1" class="subject_name1">
								<option value="0" selected="selected">--请选择--</option>
							</select>
						</div>
					</div>
				</li>
				<li>
					<div id="div1-div">
						<span class="span5">单选题：</span>
							<div id="div-select">
								<select id="dropdown2" class="subject_name2">
									<option value="0" selected="selected">--请选择--</option>
									<option value="1">1</option>
									<option value="2">2</option>
									<option value="3">3</option>
									<option value="4">4</option>
									<option value="5">5</option>
									<option value="6">6</option>
									<option value="7">7</option>
									<option value="8">8</option>
									<option value="9">9</option>
									<option value="10">10</option>
									<option value="11">11</option>
									<option value="12">12</option>
									<option value="13">13</option>
									<option value="14">14</option>
									<option value="15">15</option>
									<option value="16">16</option>
									<option value="17">17</option>
									<option value="18">18</option>
									<option value="19">19</option>
									<option value="20">20</option>
								</select>
							</div>                                                       
					</div>
				</li>
				<li>
					<div id="div1-div">
						<span class="span5">多选题：</span>
						<div id="div-select">
							<select id="dropdown3" class="subject_name2">
								<option value="0" selected="selected">--请选择--</option>
								<option value="1">1</option>
								<option value="2">2</option>
								<option value="3">3</option>
								<option value="4">4</option>
								<option value="5">5</option>
								<option value="6">6</option>
								<option value="7">7</option>
								<option value="8">8</option>
								<option value="9">9</option>
								<option value="10">10</option>
								<option value="11">11</option>
								<option value="12">12</option>
								<option value="13">13</option>
								<option value="14">14</option>
								<option value="15">15</option>
								<option value="16">16</option>
								<option value="17">17</option>
								<option value="18">18</option>
								<option value="19">19</option>
								<option value="20">20</option>
							</select>
						</div>
					</div>
				</li>
				<li>
					<div id="div1-div">
						<span class="span5">简答题：</span>
						<div id="div-select">
							<select id="dropdown4" class="subject_name2">
								<option value="0" selected="selected">--请选择--</option>
								<option value="1">1</option>
								<option value="2">2</option>
								<option value="3">3</option>
								<option value="4">4</option>
								<option value="5">5</option>
								<option value="6">6</option>
								<option value="7">7</option>
								<option value="8">8</option>
								<option value="9">9</option>
								<option value="10">10</option>
								<option value="11">11</option>
								<option value="12">12</option>
								<option value="13">13</option>
								<option value="14">14</option>
								<option value="15">15</option>
								<option value="16">16</option>
								<option value="17">17</option>
								<option value="18">18</option>
								<option value="19">19</option>
								<option value="20">20</option>
							</select>
						</div>
					</div>
				</li>
				<li>
					<div id="div1-div">
						<span class="span5">难度：</span>
						<div id="xingTest1" class="buju"></div>
					</div>
					
				</li>
				<li>
					<div id="div1-div">
						<button type="submit" class="layui-btn layui-btn-normal submit" onclick="sel()">生成试卷</button>
					</div>
				</li>
			</ul>
		</div>
		<div id="div2">
			<div id="div2-div1">
				<table border="0" cellspacing="0" cellpadding="0">
					<tr class="tr">
						<th class="head-th1"><span class="span1">名称</span></th>
						<th class="head-th2"><span class="span1">学科</span></th>
						<th class="head-th3"><span class="span1">创建时间</span></th>
						<th class="head-th4"><span class="span2"></span></th>
					</tr>
				</table>
			</div>
			<div id="div2-div2">
				<table border="0" cellspacing="0" cellpadding="0" class="table_studentpaper">
					
				</table>
			</div>
			<div id="div2-div3">
				<table border="0" cellspacing="0" cellpadding="0">
					<tr>
						<th>
							<div id="demo5"></div>
						</th>
					</tr>
				</table>
			</div>
		</div>
		<script>
			function sel(){
				var dropdown1 = document.getElementById('dropdown1').value;
				var dropdown2 = document.getElementById('dropdown2').value;
				var dropdown3 = document.getElementById('dropdown3').value;
				var dropdown4 = document.getElementById('dropdown4').value;
				$.ajax({
					type: 'GET',
					url: 'http://localhost:8081/questionBank/setQuestionBank',
					dataType: 'json',
					data: {"dropdown1":dropdown1,'dropdown2':dropdown2,'dropdown3':dropdown3,'dropdown4':dropdown4},
					success: function(data){
						if(data=='200'){
							alert("试卷生成成功");
							window.location.replace(location);
						}
						if(data=='201'){
							alert("题库试题不足")
						}
					},
				});
			}
		</script>
		<script type="text/javascript">
				
				//头像下二级菜单
				var show = document.getElementById("show")
				var erji1 = document.getElementById("erji");
				show.onclick = function(){
					if(erji1.style.display=="none"){
						erji1.style.display="block";
					}else{
						erji1.style.display="none";
					}
				}
				//退出
						function clos(){
						     if(confirm("您确定要退出本系统吗？")){
						        $.ajax({
						        	type:"POST",
						        	url:"http://localhost:8081/infomation/logout",
						        	dataType:"text",
						        	// async:false,
						        	success:function(data){
						        		if(data=="200"){
											alert("退出成功");
											window.location.href = "student_login.html";
										}else{
											alert("退出失败");
										}
						        	}
						        })
						    }
						};
		
		</script>
		
		<script>
		layui.use(['laypage', 'layer','slider','rate','dropdown'], function(){
		  var laypage = layui.laypage
		  ,slider = layui.slider
		  ,rate = layui.rate
		  ,layer = layui.layer
		  ,dropdown = layui.dropdown;
		  
		  //星星--评分
		  //基础效果
		    rate.render({
		      elem: '#xingTest1'
			  ,
		    })
		  //步长
		   slider.render({
			  elem:'#slideTest5'
		      ,step: 1 //步长
		      ,showstep: true //开启间隔点
			  ,max:20 //最大长度设为20
		    });
			slider.render({
				elem:'#slideTest6'
			   ,step: 1 //步长
			   ,showstep: true //开启间隔点
			   ,max:20 //最大长度设为20
			 });
			 slider.render({
			 	 elem:'#slideTest7'
			    ,step: 1 //步长
			    ,showstep: true //开启间隔点
			 			  ,max:20 //最大长度设为20
			  });
		  
		  //开启HASH
		    laypage.render({
		      elem: 'demo5'
		      ,count: 100
		      ,curr: location.hash.replace('#!fenye=', '') //获取hash值为fenye的当前页
		      ,hash: 'fenye' //自定义hash值
		    });
			//调用分页
			  laypage.render({
			    elem: 'demo20'
			    ,count: data.length
			    ,jump: function(obj){
			      //模拟渲染
			      document.getElementById('biuuu_city_list').innerHTML = function(){
			        var arr = []
			        ,thisData = data.concat().splice(obj.curr*obj.limit - obj.limit, obj.limit);
			        layui.each(thisData, function(index, item){
			          arr.push('<li>'+ item +'</li>');
			        });
			        return arr.join('');
			      }();
			    }
			  });
		});
		</script>
		
		<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />

		<footer>
				<div>
					<ul class="foter" style="width: 100%; ">
						<li>
							<p style="font-size: 20px;">产品介绍</p>
							<br>
							<p><a href="https://www.mindskip.net/sdd.html">思多多智能考试平台</a></p>
							<p><a href="https://www.mindskip.net/wdd.html">维多多培训考试系统</a></p>
							<p><a href="https://www.mindskip.net/xdd.html">学多多考试系统</a></p>
							<p><a href="https://www.mindskip.net/xzs.html">学致死考试系统</a></p>
						</li>

						<li>
							<p style="font-size: 20px;">跃考 H5、小程序</p>
							<img src="img/learn-HomePage-img/foewm.PNG" style="width: 90%;"/>
						</li>
						<li>
							<p style="font-size: 20px;">维考 H5、小程序</p>
							<img src="img/learn-HomePage-img/wk.PNG" style="width: 90%;"/>
						</li>
						<li>
							<p style="font-size: 20px;">学多多小程序</p>
							<img src="img/learn-HomePage-img/xdd.PNG" style="width: 90%;"/>
						</li>
						<li>
							<p style="font-size: 20px;">关于我们</p>
							<img src="img/learn-HomePage-img/gywm.PNG" style="width: 90%;"/>
						</li>
						<li style="float: right;">
							<p style="font-size: 20px;">开源社区</p>
							<a href="https://github.com/mindskip/xzs"><img src="img/learn-HomePage-img/gywm1.PNG" style="width: 40%;"/></a>
							<a href="https://gitee.com/mindskip/uexam"><img src="img/learn-HomePage-img/kysq2.PNG" style="width: 40%;"/></a>
						</li>
						<div style="clear: both;"></div>
					</ul>
					
				</div>
				
				
			</footer>
	</body>
</html>
